package com.geologyoa.servlet;

import java.io.IOException;
import java.io.PrintWriter;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.geologyoa.domain.xmqkQueryObj;
import com.geologyoa.service.SystemManager;
import com.geologyoa.service.SystemManagerImpl;

public class SearchXmqk01ForOneToMany extends HttpServlet {

	/**
	 * Constructor of the object.
	 */
	public SearchXmqk01ForOneToMany() {
		super();
	}

	/**
	 * Destruction of the servlet. <br>
	 */
	public void destroy() {
		super.destroy(); // Just puts "destroy" string in log
		// Put your code here
	}

	/**
	 * The doGet method of the servlet. <br>
	 *
	 * This method is called when a form has its tag value method equals to get.
	 * 
	 * @param request the request send by the client to the server
	 * @param response the response send by the server to the client
	 * @throws ServletException if an error occurred
	 * @throws IOException if an error occurred
	 */
	public void doGet(HttpServletRequest request, HttpServletResponse response)
			throws ServletException, IOException {

		doPost(request, response);
	}

	/**
	 * The doPost method of the servlet. <br>
	 *
	 * This method is called when a form has its tag value method equals to post.
	 * 
	 * @param request the request send by the client to the server
	 * @param response the response send by the server to the client
	 * @throws ServletException if an error occurred
	 * @throws IOException if an error occurred
	 */
	public void doPost(HttpServletRequest request, HttpServletResponse response)
			throws ServletException, IOException {

		response.setContentType("text/html;charset=utf-8");
		response.setHeader("Cache-Control", "no-cache");
		response.setHeader("Expires", "0");
		response.setHeader("Pragma", "No-cache");
		PrintWriter out = response.getWriter();
		SystemManager sys=new SystemManagerImpl();
		String XMQK01003 = request.getParameter("XMQK01003");//项目名称
		String XMQK01002 =request.getParameter("XMQK01002");//项目统一编号
		String XMQK01005 = request.getParameter("XMQK01005");///项目年度
		String XMQK01006 = request.getParameter("XMQK01006");//项目类型或者项目子类型
		String XMQK01009 = request.getParameter("XMQK01009");//承担单位
		String XMQK01136 = request.getParameter("XMQK01136");//项目所在市
		String XMQK01137 = request.getParameter("XMQK01137");//项目所在县
		String cjdw = request.getParameter("CJDW");///参建单位
		String zjly = request.getParameter("ZJLY");////资金来源类别
		String zjpfnd = request.getParameter("ZJPFND");//资金批复年度
		String zjpfMin = request.getParameter("MINZJPF");//年度资金批复最小值
		String zjpfMax = request.getParameter("MAXZJPF");//年度资金批复最大值。
		
		String minfy=request.getParameter("MINFY");//项目总费用最小值
		String maxfy=request.getParameter("MAXFY");//项目总费用最大值
		String minjgtime=request.getParameter("MINJGTIME");//竣工时间起
		String maxjgtime=request.getParameter("MAXJGTIME");//竣工时间止
		String XMQK01016 = request.getParameter("XMQK01016");//涉及灾害点
		
		/*String XMQK01003 = "";//项目名称
		String XMQK01005 = "";///项目年度
		String XMQK01006 = "";//项目类型或者项目子类型
		String XMQK01009 = "监理单位";//承担单位
		String XMQK01036 = "";//项目所在市
		String XMQK01037 = "";//项目所在县
		String cjdw = "";///参建单位
		String zjly = "";////资金来源类别
		String zjpfnd = "";//资金批复年度
		String zjpfMin = "";//年度资金批复最小值
		String zjpfMax = "";//年度资金批复最大值。
		
		String minfy="";//项目总费用最小值
		String maxfy="";//项目总费用最大值
		String minjgtime="";//竣工时间起
		String maxjgtime="";//竣工时间止
		String XMQK01016 = "";//涉及灾害点
*/		xmqkQueryObj obj = new xmqkQueryObj(XMQK01003,XMQK01002,XMQK01005,XMQK01006,XMQK01009,XMQK01136,XMQK01137,cjdw,
				zjly,zjpfnd,zjpfMin,zjpfMax,minfy,maxfy,minjgtime,maxjgtime,XMQK01016);
		String res = sys.SearchXmqk01(obj);
		
		out.write(res);
	}

	/**
	 * Initialization of the servlet. <br>
	 *
	 * @throws ServletException if an error occurs
	 */
	public void init() throws ServletException {
		// Put your code here
	}

}
